﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SmmMailingReport.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="spGetMailingReport" SelectCommandType="StoredProcedure"
            OnSelecting="SqlDataSource1_Selecting">
            <SelectParameters>
                <asp:Parameter ConvertEmptyStringToNull="True" Name="subject" Type="Int32" DefaultValue="0" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource1" EmptyDataText="no data" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:HyperLinkField DataTextField="moid" HeaderText="moid" SortExpression="moid" DataNavigateUrlFields="moid" DataNavigateUrlFormatString="default.aspx?moid={0}" Target="_blank" />
                <asp:BoundField DataField="sent" HeaderText="sent" ReadOnly="True" SortExpression="sent" />
                <asp:BoundField DataField="emails_read" HeaderText="emails_read" ReadOnly="True" SortExpression="emails_read" />
                <asp:BoundField DataField="landed" HeaderText="landed" ReadOnly="True" SortExpression="landed" />
                <asp:BoundField DataField="pct" HeaderText="pct" ReadOnly="True" SortExpression="pct" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="spGetMailingReportBySubject" SelectCommandType="StoredProcedure"
            OnSelecting="SqlDataSource2_Selecting">
            <SelectParameters>
                <asp:Parameter ConvertEmptyStringToNull="True" Name="moid" Type="Int32" DefaultValue="0" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource2" EmptyDataText="no data" ForeColor="#333333" GridLines="None" DataKeyNames="id">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="id" HeaderText="id" SortExpression="id" InsertVisible="False" ReadOnly="True" />
                <asp:HyperLinkField DataTextField="subject" HeaderText="subject" SortExpression="subject" DataNavigateUrlFields="id" DataNavigateUrlFormatString="default.aspx?subject={0}" Target="_blank" />
                <asp:BoundField DataField="sent" HeaderText="sent" ReadOnly="True" SortExpression="sent" />
                <asp:BoundField DataField="emails_read" HeaderText="emails_read" ReadOnly="True" SortExpression="emails_read" />
                <asp:BoundField DataField="landed" HeaderText="landed" ReadOnly="True" SortExpression="landed" />
                <asp:BoundField DataField="pct" HeaderText="pct" ReadOnly="True" SortExpression="pct" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </form>
</body>
</html>
